'''
 * Licensed to the Apache Software Foundation (ASF) under one
 * or more contributor license agreements.  See the NOTICE file
 * distributed with self work for additional information
 * regarding copyright ownership.  The ASF licenses self file
 * to you under the Apache License, Version 2.0 (the
 * "License") you may not use self file except in compliance
 * with the License.  You may obtain a copy of the License at
 *
 *     http:#www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
'''


#import org.apache.jena.graph.Triple;
#import org.apache.jena.util.iterator.ExtendedIterator;

#import java.util.stream.Stream;

'''
 * A triple store is a collection of triples that supports access to
 * triples matching a triple pattern.
'''
from abc import ABC, abstractmethod

class TripleStore (ABC):

    '''
     * Add a triple to the map.
     *
     * @param triple to add
    '''
    # param final Triple triple
    # result void
    @abstractmethod
    def add(self, triple):
        pass

    '''
     * Remove a triple from the map.
     *
     * @param triple to remove
    '''
    # param final Triple triple
    # result void
    @abstractmethod
    def remove(self, triple):
        pass

    '''
     * Remove all triples from the map.
    '''
    # param 
    # result void
    @abstractmethod
    def clear(self):
        pass

    '''
     * Return the number of triples in the map.
    '''
    # param 
    # result int
    @abstractmethod
    def countTriples(self):
        pass

    '''
     * Return True if the map is empty.
    '''
    # param 
    # result boolean
    @abstractmethod
    def isEmpty(self):
        pass


    '''
     * Answer True if the graph contains any triple matching <code>t</code>.
     *
     * @param tripleMatch triple match pattern, which may be contained
    '''
    # param final Triple tripleMatch
    # result boolean
    @abstractmethod
    def contains(self, tripleMatch):
        pass

    '''
     * Returns a:@link Streamof all triples in the graph.
     * Note::@link Stream#parallel()is supported.
     *
     * @return a stream  of triples in self graph.
    '''
    # Stream<Triple> stream()

    '''
     * Returns a:@link Streamof Triples matching the given pattern.
     * Note::@link Stream#parallel()is supported.
     *
     * @param tripleMatch triple match pattern
     * @return a stream  of triples in self graph matching the pattern.
    '''
    # Stream<Triple> stream(final Triple tripleMatch)

    '''
     * Returns an:@link ExtendedIteratorof all triples in the graph matching the given triple match.
    '''
    # ExtendedIterator<Triple> find(final Triple tripleMatch)

